package com.ruoyi.Order.mapper;

import com.ruoyi.Order.domain.Order;

import java.util.List;	
import java.util.Map;

import org.apache.ibatis.annotations.Param;

/**
 * 订单 数据层
 * 
 * @author ruoyi
 * @date 2019-07-16
 */
public interface OrderMapper 
{
	/**
     * 查询订单信息
     * 
     * @param id 订单ID
     * @return 订单信息
     */
	public Order selectOrderById(Integer id);
	
	/**
     * 查询订单商品信息
     * 
     * @param id 订单ID
     * @return 订单商品信息
     */
	public List<Order> selectOrderGoodsList(Integer id);
	
	/**
     * 查询订单列表
     * 
     * @param order 订单信息
     * @return 订单集合
     */
	public List<Order> selectOrderList(Order order);
	
	/**
     * 新增订单
     * 
     * @param order 订单信息
     * @return 结果
     */
	public int insertOrder(Order order);
	
	/**
     * 修改订单
     * 
     * @param order 订单信息
     * @return 结果
     */
	public int updateOrder(Order order);
	
	/**
     * 删除订单
     * 
     * @param id 订单ID
     * @return 结果
     */
	public int deleteOrderById(Integer id);
	
	/**
     * 批量删除订单
     * 
     * @param ids 需要删除的数据ID
     * @return 结果
     */
	public int deleteOrderByIds(String[] ids);
	
	public int selectCountOnThisDay(@Param("days") String days,@Param("schoolId") int schoolId);
	
	public int selectCountOnThisDayForTUIKUAN(@Param("days") String days,@Param("schoolId") int schoolId);
	
	public int selectCountOnThisMonth(@Param("month") String month,@Param("schoolId") int schoolId);
	
	public int selectCountOnThisMonthForTUIKUAN(@Param("month") String month,@Param("schoolId") int schoolId);
	
	public int selectCountOnThisYear(String year,int schoolId);
	
	public int selectCountOnThisYearForTUIKUAN(String year,int schoolId);
	
	public int selectCountAll(@Param("schoolId") int schoolId);
	
	public int selectVerifyOrderCount(@Param("deptId") String deptId);
	
	
	public List<Map<String,Object>> selectCountForInformationMonth(@Param("schoolId") int schoolId,@Param("createDate") String createDate,@Param("flag") int flag);
	
	public List<Map<String,Object>> selectCountForInformationYear(@Param("schoolId") int schoolId,@Param("year") String year,@Param("flag") int flag);
	
	public List<Map<String,Object>> selectMoneyForInformationMonth(@Param("schoolId") int schoolId,@Param("createDate") String createDate);
	
	public List<Map<String,Object>> selectMoneyForInformationYear(@Param("schoolId") int schoolId,@Param("year") String year);
	
	public List<Map<String,Object>> selectCountForStoreYear(@Param("deptId") String deptId,@Param("year") String year,@Param("flag") int flag);
	public List<Map<String,Object>> selectMoneyEveryday(@Param("deptId") String deptId);
	
}